package model

import (
	"time"
)

type SysRole struct {
	CreatedAt       time.Time  `json:"createdAt"` // 创建时间
	UpdatedAt       time.Time  `json:"updatedAt"` // 更新时间
	DeletedAt       *time.Time `json:"deletedAt" sql:"index"`
	RoleId          string     `json:"roleId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"` // 角色ID
	RoleName        string     `json:"roleName" gorm:"comment:角色名"`                                    // 角色名
	ParentId        string     `json:"parentId" gorm:"comment:父角色ID"`                                  // 父角色ID
	DataAuthorityId []SysRole  `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"`
	Children        []SysRole  `json:"children" gorm:"-"`
	//SysBaseMenus    []SysBaseMenu `json:"menus" gorm:"many2many:sys_authority_menus;"`
	DefaultRouter string `json:"defaultRouter" gorm:"comment:默认菜单;default:dashboard"` // 默认菜单(默认dashboard)
}
